
<template>
  <div class="bgff p20" style="min-height:100%;box-sizing:border-box;">
    <el-tree
      :data="data2"
      show-checkbox
      default-expand-all
      node-key="id"
      ref="tree"
      highlight-current
      :default-checked-keys="[1,2,3,4,5,6,7,8]"
      :props="defaultProps"
    ></el-tree>
    <el-button class="mt20" type="primary" size="small" @click="updata">提交</el-button>
  </div>
</template>

<script>
export default {
  name: "auth",
  data() {
    return {
      data2: [
        {
          id: 1,
          label: " 首页",
          children: []
        },
        {
          id: 2,
          label: "工程管理",
          children: []
        },
        {
          id: 3,
          label: "流量检测",
          children: [
            {
              id: 100,
              label: "实时报表"
            }
          ]
        },
        {
          id: 4,
          label: "历史报表",
          children: [
            {
              id: 101,
              label: "历史数据"
            },
            {
              id: 102,
              label: "历史曲线"
            }
          ]
        },
        {
          id: 5,
          label: "报警管理",
          children: [
            {
              id: 103,
              label: "实时报警"
            },
            {
              id: 104,
              label: "报警记录"
            }
          ]
        },
        {
          id: 6,
          label: "监控管理",
          children: [
            {
              id: 105,
              label: "监控地图"
            },
            {
              id: 106,
              label: "监控视频"
            }
          ]
        },
        {
          id: 7,
          label: "用户管理",
          children: [
            {
              id: 107,
              label: "添加用户"
            }
          ]
        },
        {
          id: 8,
          label: "权限管理",
          children: [
            {
              id: 108,
              label: "账户权限"
            },
            {
              id: 109,
              label: "添加账户"
            }
          ]
        }
      ],
      defaultProps: {
        children: "children",
        label: "label"
      }
    };
  },
  methods: {
    updata(){
      this.$router.go(-1)
    }
  }
};
</script>

<style scoped>
</style>

